package com.timepies.database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DbHelper extends SQLiteOpenHelper {

	public DbHelper(Context context) {
		super(context, DbConstant.DBNAME, null, DbConstant.DBVERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String q = "CREATE TABLE " + DbConstant.TBL_NAME
				+ " ( _id INTEGER PRIMARY KEY AUTOINCREMENT,"
				+ DbConstant.FIELD_SUBJECT + " TEXT," + DbConstant.FIELD_TEXT
				+ " TEXT," + DbConstant.FIELD_DATE + " TEXT)";
		db.execSQL(q);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	}

}
